<?php
/*
 * 注册表类
*/
class Registry{
	private static $instance;
	private $request;
	public $data = array();

	private function __construct(){
		
	}


    //静态的单例模式
	static function instance(){
		if(! isset(self::$instance)){
			self::$instance = new self();
		}
		return self::$instance;
	}

	//获取对象
	function getRequest($key){
		return $this->data[$key];
	}

	//存放对象
	function setRequest($key,$value){
		$this->data[$key] = $value;
	}
}